//
//  TTPosterViewCell.m
//  TaoTuo
//
//  Created by admin on 2019/12/5.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTPosterViewCell.h"
#import <UIImageView+WebCache.h>


@implementation TTPosterViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(5 * kScale, 5 * kScale, self.width - 10 * kScale, self.height - 10 * kScale)];
        bgView.layer.shadowColor = [UIColor blackColor].CGColor;
        bgView.layer.shadowOffset = CGSizeZero;
        bgView.layer.shadowOpacity = 0.2;
        bgView.layer.shadowPath = [UIBezierPath bezierPathWithRoundedRect:bgView.bounds cornerRadius:10].CGPath;
        [self addSubview:bgView];
        
        
        _imageView = [[UIImageView alloc] initWithFrame:bgView.frame];
        _imageView.layer.cornerRadius = 10;
        _imageView.layer.masksToBounds = YES;
        [self addSubview:_imageView];
        
    }
    return self;
}


- (void)setUrlString:(NSString *)urlString
{
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:urlString] placeholderImage:[UIImage imageNamed:@"sq_placeholder_img"] options:SDWebImageRetryFailed];
}


@end
